home *** CD-ROM | disk | FTP | other *** search
/ Clinton - Portrait of Victory / PORTRAIT OF VICTORY.BIN / cltpc256 / eagle.txt < prev    next >
Text File  |  1992-12-30  |  9KB  |  480 lines

  1. ifvideo s okayv
  2.  
  3. ifvideo 1
  4.   video 1
  5.   set center on
  6.   text 0 20 "Sorry, this program requires a Super"
  7.   text 0 19 "VGA card and multisync monitor to run."
  8.   text 0 17 "Press <ENTER> to exit."
  9.   set center off
  10. endif
  11.  
  12. ifvideo 2
  13.   video 2
  14.   set center on
  15.   text 0 20 "Sorry, this program requires a Super"
  16.   text 0 19 "VGA card and multisync monitor to run."
  17.   text 0 17 "Press <ENTER> to exit."
  18.   set center off
  19. endif
  20.  
  21. ifvideo h
  22.   video h
  23.   set center on
  24.   text 0 200 "Sorry, this program requires a Super"
  25.   text 0 190 "VGA card and multisync monitor to run."
  26.   text 0 170 "Press <ENTER> to exit."
  27.   set center off
  28. endif
  29.  
  30. waitkey
  31. exit
  32.  
  33. okayv:
  34. ifmem 510000 okaym
  35. video 1
  36. text 8 21 "THERE IS NOT ENOUGH AVAILABLE MEMORY FOR THIS PRESENTATION"
  37. text 8 20 "TO RUN.  TO REMEDY THIS, TRY THE FOLLOWING:"
  38.  
  39. text 8 17 "Reboot your computer with a bootable floppy disk that"
  40. text 8 16 "contains COMMAND.COM to remove any memory resident"
  41. text 8 15 "programs that were installed and try the presentation"
  42. text 8 14 "again.  After viewing the presentation, reboot your"
  43. text 8 13 "computer normally to restore your original set-up."
  44.  
  45. set center on
  46. text 0 10 "Press <ENTER> to quit."
  47. set center off
  48. waitkey
  49. exit
  50.  
  51. okaym:
  52. video s
  53. ;----------------------------------------------------------------------------
  54. ;Initialize CD-ROM Drive
  55. ;----------------------------------------------------------------------------
  56. cdinit
  57.  
  58. set esc off
  59. set space off
  60. set wrap off
  61. set abort off
  62.  
  63. pload ebkg 1
  64. palette 1
  65. pfade 0 1
  66. pfree 1
  67. pload etit 1
  68. putup 90 187 p1
  69. pfree 1
  70.   cdplay 69 23
  71.   timer
  72.   lpm2:
  73.   if @elapsed<23000
  74.     goto lpm2
  75.   endif
  76.   cdstop
  77. pload ebkgx 1
  78. putup 0 67 p1
  79. pfree 1
  80.  
  81. menu1:
  82. pload emtit 1
  83. putup 113 105 p1
  84. pfree 1
  85. pload ebche 1
  86. putup 0 0 p1
  87. pfree 1
  88. mn1:
  89. waitkey
  90. getkey k
  91. if @k==1
  92.   pload ebkgx 1
  93.   putup 0 67 p1
  94.   pfree 1
  95.   link eagle1
  96. else
  97.   if @k==2
  98.     pload ebkgx 1
  99.     putup 0 67 p1
  100.     pfree 1
  101.     link eagle2
  102.   else
  103.     if @k==3
  104.       pload ebkgx 1
  105.       putup 0 67 p1
  106.       pfree 1
  107.       link eagle3
  108.     else
  109.       if @k==chr(104)||@k==chr(72)
  110.         goto help
  111.       else
  112.         if @k==chr(99)||@k==chr(67)
  113.           goto credits
  114.         else
  115.           if @k==chr(101)||@k==chr(69)
  116.             pload ebkgx 1
  117.             putup 0 67 p1
  118.             pfree 1
  119.             pload edexit 1
  120.             putup 190 200 p1
  121.             pfree 1
  122.             menu1b:
  123.             waitkey
  124.             getkey k
  125.             if @k==chr(13)
  126.               exit
  127.             else
  128.               if @k==chr(27)
  129.                 pload ebkgx 1
  130.                 putup 0 67 p1
  131.                 pfree 1
  132.                 pload emtit 1
  133.                 putup 113 105 p1
  134.                 pfree 1
  135.                 goto mn1
  136.               else
  137.                 goto menu1b
  138.               endif
  139.             endif
  140.           else
  141.             goto mn1
  142.           endif
  143.         endif
  144.       endif
  145.     endif
  146.   endif
  147. endif
  148. exit
  149.  
  150. help:
  151. pload ebkg 1
  152. pfade 0 1
  153. pfree 1
  154. pload edhelp 1
  155. putup 31 74 p1
  156. pfree 1
  157. fload ibm8 1
  158. fgaps 1 4 2
  159. set buf readfile(mainhlp.doc)
  160. window 65 345 575 100
  161. color 1
  162. text @@buf
  163. . farfree(@buf)
  164. window
  165. ffree 1
  166. hlp1:
  167. waitkey
  168. getkey k
  169. if @k==chr(13)
  170.   pload ebkg 1
  171.   pfade 0 1
  172.   pfree 1
  173.   goto menu1
  174. else
  175.   goto hlp1
  176. endif
  177.  
  178. credits:
  179. set num 1
  180. pload ebkg 1
  181. pfade 0 1
  182. pfree 1
  183. crd1:
  184. color 0
  185. rect 40 90 600 415
  186. color 1
  187. fload ibm8 1
  188. fgaps 1 4 2
  189. set buf readfile(crds$@num$.doc)
  190. window 60 95 580 400
  191. text @@buf
  192. . farfree(@buf)
  193. window
  194. set center on
  195. ffree 1
  196. fload ibm8 1
  197. text 0 135 "Page "$@num$" of 2"
  198. text 0 125 "Press <PGUP> for next or <PGDN> for prior."
  199. text 0 105 "PRESS <ENTER> TO RETURN TO MENU"
  200. set center off
  201. ffree 1
  202. crd2:
  203. waitkey
  204. getkey k
  205. if @k==chr(13)
  206.   pload ebkg 1
  207.   pfade 0 1
  208.   pfree 1
  209.   goto menu1
  210. else
  211.   if @k==chr(73)$chr(1)||@k==chr(72)$chr(1)
  212.     if @num==2
  213.       set num 1
  214.       goto crd1
  215.     else
  216.       set num @num+1
  217.       goto crd1
  218.     endif
  219.   else
  220.     if @k==chr(81)$chr(1)||@k==chr(80)$chr(1)
  221.       if @num==1
  222.         set num 2
  223.         goto crd1
  224.       else
  225.         set num @num-1
  226.         goto crd1
  227.       endif
  228.     else
  229.       goto crd2
  230.     endif
  231.   endif
  232. endif
  233.  
  234. ;
  235. ;    CDINIT
  236. ;
  237. ;    Check for CD-ROM driver and setup @drive
  238. ;
  239. cdinit:
  240.     int 0x2f 0x1500,0
  241.     if @bx
  242.         global drive chr(@cx+asc("A"))
  243.     else
  244.         global drive ""
  245.     endif
  246.     return
  247.  
  248. cdplay:
  249.     cdtrack    @1 @3 @4 @5
  250.     cdcmd    132,@0,@2*75
  251.     cdcheck    @0,cdplay
  252.     return
  253.  
  254. ;
  255. ;    CDPLAYTO TRACK MINUTES SECONDS FRAMES TRACK MINUTES SECONDS FRAMES
  256. ;
  257. ;
  258. cdplayto:
  259.     cdtrack    @1 @2 @3 @4
  260.     local    begin @0
  261.     cdtrack    @5 @6 @7 @8
  262.     local    end @0
  263.     cdcmd    132,@begin,@end-@begin
  264.     cdcheck    @0,cdplayto
  265.     return
  266.  
  267. ;
  268. ;    CDSTOP
  269. ;
  270. ;    Stop playing immediately
  271. ;
  272. cdstop:
  273.     cdcmd    133,0,0
  274.     cdcheck    @0,cdstop
  275.     return
  276.  
  277. ;
  278. ;    CDRESUME
  279. ;
  280. ;    Resume playing from where we issued a CDSTOP
  281. ;
  282. cdresume:
  283.     cdcmd    136,0,0
  284.     cdcheck    @0,cdresume
  285.     return
  286.  
  287. ;
  288. ;    CDSEEK TRACK {MINUTES SECONDS FRAMES}
  289. ;
  290. ;    Seek the CD player head to a track to minimize play startup time.
  291. ;    Parameters are the same as CDPLAY.
  292. ;
  293. cdseek:
  294.     cdtrack @1 @2 @3 @4
  295.     cdcmd 131,@0,0
  296.     cdcheck    @0,cdseek
  297.     return
  298.  
  299. ;
  300. ;    CDEJECT
  301. ;
  302. ;    Open the CD drive's tray/door
  303. ;
  304. cdeject:
  305.     local    buf ofs("1")
  306.     local    bseg seg(@buf);
  307.     poke    @bseg @buf 0                ;Eject Disk
  308.     cdcmd    12,@buf|(@bseg<<16),1            ;WRITE IOCTL Output
  309.     cdcheck    @0,cdeject
  310.     return
  311.  
  312. ;
  313. ;    CDCLOSE
  314. ;
  315. ;    Close the CD drive's tray/door
  316. ;
  317. cdclose:
  318.     local    buf ofs("1")
  319.     local    bseg seg(@buf);
  320.     poke    @bseg @buf 5                ;Close Tray
  321.     cdcmd    12,@buf|(@bseg<<16),1            ;WRITE IOCTL Output
  322.     cdcheck    @0,cdclose
  323.     return
  324.  
  325.  
  326. ;
  327. ;    CDSTATUS
  328. ;
  329. ;    Return CD Drive status and setup global variables @first and @last
  330. ;
  331. cdstatus:
  332.     local    buf ofs("123456")
  333.     local    bseg seg(@buf);
  334.     poke    @bseg @buf 10                ;Audio Disk Info
  335.     cdcmd    3,@buf|(@bseg<<16),6            ;READ IOCTL Input
  336.     cdcheck    @0,cdstatus
  337.     global    first peek(@bseg,@buf+1)+0
  338.     global    last  peek(@bseg,@buf+2)+0
  339.     poke    @bseg @buf 6                ;Device status
  340.     cdcmd    3,@buf|(@bseg<<16),5            ;READ IOCTL Input
  341.     cdcheck    @0,cdstatus
  342.     return    peekl(@bseg,@buf+1)
  343.  
  344. ;
  345. ;    CDTRACK TRACK MINUTES SECONDS FRAMES
  346. ;
  347. ;    Return the absolute sector number of a track
  348. ;
  349. cdtrack:
  350.     local    buf ofs("1234567")
  351.     local    bseg seg(@buf);
  352.     poke    @bseg @buf 11                ;Get Audio Track Info
  353.     poke    @bseg @buf+1 @1             ;track number
  354.     cdcmd    3,@buf|(@bseg<<16),7            ;READ IOCTL Input
  355.     cdcheck    @0,cdtrack
  356.     return    peekl(@bseg,@buf+2)+(@2*60+@3)*75+@4    ;return track address
  357.  
  358.  
  359. cdcmd:
  360.     local req ofs("12345678901234567890123456")
  361.     local rseg seg(@req)
  362.     poke  @rseg @req 13                ;param length
  363.     poke  @rseg @req+1 0                ;subunit
  364.     poke  @rseg @req+2 @1                ;command code
  365.     pokew @rseg @req+3 0                ;status
  366.     pokel @rseg @req+5 0 0                ;reserved
  367.     poke  @rseg @req+13 1                ;address mode
  368.     pokel @rseg @req+14 @2                ;begin
  369.     pokel @rseg @req+18 @3                ;length
  370.     pokel @rseg @req+22 0                ;reserved
  371.     int 0x2f 0x1510,@req,asc(@drive)-asc("A"),,,,,seg(@req)
  372.     if peek(@rseg,@req+4)&0x80
  373.         databegin
  374.             "Unknown Error"
  375.             "Write-protect violation"
  376.             "Unknown unit"
  377.             "Drive not Ready"
  378.             "Unknown command"
  379.             "CRC error"
  380.             "Bad drive request structure length"
  381.             "Seek Error"
  382.             "Unknown media"
  383.             "Sector not found"
  384.             "Printer out of paper"
  385.             "Write Fault"
  386.             "Read Fault"
  387.             "General failure"
  388.             "Reserved 1"
  389.             "Reserved 2"
  390.             "Invalid disk change"
  391.         dataend
  392.         if peek(@rseg,@req+3)<16
  393.             dataskip peek(@rseg,@req+3)+1
  394.         endif
  395.         return @
  396.     else
  397.         return ""
  398.     endif
  399.  
  400.  
  401. cdcheck:
  402.     if @1!=""
  403.         clearscr 0
  404.         fload ibm8 1
  405.         color 255
  406.         set center on
  407.         text 0 200 @2$": "$@1
  408.         text 0 180 "Press any key to exit"
  409.         set center off
  410.         ffree 1
  411.         waitkey
  412.         exit            
  413.     endif
  414.     return
  415.  
  416.  
  417. prtstatus:
  418.     if @1&1
  419.         text "Door Open"$chr(10)
  420.     else
  421.         text "Door Closed"$chr(10)
  422.     endif
  423.  
  424.     if @1&2
  425.         text "Door unlocked"$chr(10)
  426.     else
  427.         text "Door locked"$chr(10)
  428.     endif
  429.  
  430.     if @1&4
  431.         text "Supports cooked and raw reading"$chr(10)
  432.     else
  433.         text "Supports only cooked reading"$chr(10)
  434.     endif
  435.  
  436.     if @1&8
  437.         text "Read/write"$chr(10)
  438.     else
  439.         text "Read only"$chr(10)
  440.     endif
  441.  
  442.     if @1&16
  443.         text